import request from '@/utils/request'

// 新增分类
export function addCategory(query) {
  return request({
    url:'/datasourceCategory/create' ,
    method: 'post',
    data:query
  })
}
// 修改分类
export function editCategory(query) {
  return request({
    url:'/datasourceCategory/edit' ,
    method: 'put',
    data:query
  })
}
// 删除分类
export function delCategory(id) {
  return request({
    url:`/datasourceCategory/del/${id}` ,
    method: 'delete',
  })
}
// 获取分类信息下拉
export function getCategoryAll(query){
  return request({
    url:'/datasourceCategory/list',
    method:'get',
    params:query
  })
}
// 获取分类信息分页
export function getCategory(params){
  return request({
    url:'/datasourceCategory/page',
    method:'get',
    params:params
  })
}
